<%@ page language="C#" masterpagefile="~/masterpage.master" CodeFile="Demographics.aspx.cs" Inherits="Microsoft.Samples.SqlServer.Demographics_aspx" %>

<asp:content id="Content1" contentplaceholderid="ContentPlaceHolder1" runat="server">
<!-- =====================================================================

  File:      Demographics.aspx for Adventure Works Cycles Storefront Sample
  Summary:   Collects and saves demographics information about users.
  Date:	     November 3, 2003

=====================================================================

  This file is part of the Microsoft SQL Server Code Samples.
  Copyright (C) Microsoft Corporation.  All rights reserved.

This source code is intended only as a supplement to Microsoft
Development Tools and/or on-line documentation.  See these other
materials for detailed information regarding Microsoft code samples.

THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.

======================================================= -->
<table cellspacing="0" cellpadding="0" width="100%" border="0">
	<tr>
		<td class="ContentHead">
			<img align="left" height="32" width="60" src="images/1x1.gif">Tell Us About You
			<br />
		</td>
	</tr>
</table>
<br />
<br />
<img align="left" height="1" width="92" src="images/1x1.gif" />
<asp:label id="MyError" cssclass="ErrorText" enableviewstate="false" runat="Server" />
<span class="NormalBold">Please enter some information about you and press the Submit button.</span>
<img align="left" height="1" width="92" src="images/1x1.gif" />
<table height="300" cellspacing="10" cellpadding="0" width="500" border="0">
	<tr valign="baseline">
		<td>
			<span class="NormalBold">Birthday</span>
		</td>
		<td>
			<asp:textbox id="BirthdayTextBox" runat="server" cssclass="Normal">
			</asp:textbox>
            <asp:customvalidator id="BirthdayCustomValidator" runat="server" errormessage="The birthday must be a valid date."
                controltovalidate="BirthdayTextBox" enableclientscript="False" onservervalidate="BirthdayCustomValidator_ServerValidate" display="Dynamic">
            </asp:customvalidator>
		</td>
		<td>
			<span class="NormalBold">Marital Status</span>
		</td>
		<td>
            &nbsp;<asp:textbox id="MaritalStatusTextBox" runat="server">
                    </asp:textbox>
		</td>
	</tr>
	<tr valign="baseline">
		<td>
			<span class="NormalBold">Annual Income</span>
		</td>
        <td>
                <asp:dropdownlist id="AnnualIncomeDropDownList" 
                    runat="server" cssclass="Normal">
                    <asp:listitem></asp:listitem>
                    <asp:listitem>0-25000</asp:listitem>
                    <asp:listitem>25001-50000</asp:listitem>
                    <asp:listitem>50001-75000</asp:listitem>
                    <asp:listitem>75001-100000</asp:listitem>
                    <asp:listitem value="greater than 100000">100001+</asp:listitem>
                </asp:dropdownlist>
        </td>
		<td>
			<span class="NormalBold">Gender</span>
		</td>
		<td>
            <asp:dropdownlist id="GenderDropDownList" 
                runat="server" cssclass="Normal">
                <asp:listitem value=""></asp:listitem>
                <asp:listitem value="male">Male</asp:listitem>
                <asp:listitem value="female">Female</asp:listitem>
            </asp:dropdownlist>		
        </td>
    </tr>
    <tr valign="baseline">
		<td>
			<span class="NormalBold">Number of Children</span>
		</td>
		<td>
            <asp:textbox id="NumberOfChildrenTextBox" 
                runat="server" cssclass="Normal">
            </asp:textbox>
            <asp:rangevalidator id="NumberOfChildrenRangeValidator" runat="server" errormessage="The number of children must be a number between 0 and 200."
                maximumvalue="200" minimumvalue="0" controltovalidate="NumberOfChildrenTextBox" display="Dynamic" Type="Integer"></asp:rangevalidator>
		</td>
		<td>
			<span class="NormalBold">Number of Children at Home</span>
		</td>
		<td>
            <asp:textbox id="NumberOfChildrenAtHomeTextBox" 
                runat="server" cssclass="Normal">
            </asp:textbox>
            <asp:rangevalidator id="NumberOfChildrenAtHomeRangeValidator" runat="server" 
            errormessage="The number of children at home must be a number between 0 and 200."
                maximumvalue="200" minimumvalue="0" controltovalidate="NumberOfChildrenAtHomeTextBox" display="Dynamic" Type="Integer"></asp:rangevalidator>
		</td>                                       
    </tr>
    <tr valign="baseline">
		<td>
			<span class="NormalBold">Education</span>
		</td>
        <td>
            <asp:textbox id="EducationTextBox"
                runat="server" cssclass="Normal">
            </asp:textbox>
        </td>
		<td>
			<span class="NormalBold">Occupation</span>
		</td>
		<td>
            <asp:textbox id="OccupationTextBox" 
                runat="server" cssclass="Normal">
            </asp:textbox>
        </td>
    </tr>
    <tr valign="baseline">
		<td>
			<span class="NormalBold">Home Owner</span>
		</td>
		<td>
			<asp:checkbox id="HomeOwnerCheckBox" 
                runat="server" cssclass="Normal" />
		</td>
		<td>
			<span class="NormalBold">Number of Cars Owned</span>
		</td>
		<td>
            <asp:textbox id="NumberOfCarsOwnedTextBox" 
                runat="server" cssclass="Normal">
            </asp:textbox>
            <asp:rangevalidator id="NumberOfCarsOwnedRangeValidator" runat="server" errormessage="The number of cars owned must be a number between 0 and 200."
                maximumvalue="200" minimumvalue="0" controltovalidate="NumberOfCarsOwnedTextBox" display="Dynamic" Type="Integer"></asp:rangevalidator>
		</td>
    </tr>
</table>
<img align="left" height="1" width="92" src="images/1x1.gif" />
<table height="200" cellspacing="10" cellpadding="0" width="500" border="0">
    <tr valign="top">
		<td>
			<span class="NormalBold">Hobbies (separated by commas)</span>
		</td>
		<td>
			<span class="NormalBold">Comments</span>
		</td>
    </tr>
    <tr>
        <td>
            <asp:textbox id="HobbiesTextBox" 
                runat="server" cssclass="Normal" width="320px" height="160px">
            </asp:textbox>
        </td>
        <td>
            <asp:textbox id="CommentsTextBox" 
                runat="server" cssclass="Normal" width="320px" height="160px">
            </asp:textbox>
        </td>
    </tr>
</table>
<img align="left" height="1" width="92" src="images/1x1.gif" />
<table cellspacing="10">
    <tr>
        <td>
        <asp:imagebutton id="SumbitButton" runat="Server" imageurl="images/submit.gif" onclick="SubmitButton_Click" />
        </td>
    </tr>
</table>
</asp:content>

